package models

import (
	"time"

	"gorm.io/gorm"
)

// Category represents a book category in the database.
type Category struct {
	gorm.Model
	ID   int    `db:"category_id"`
	Name string `db:"name"`
}

// Book represents a book entry in the database.
type Book struct {
	gorm.Model
	ID          int       `db:"id"`
	Title       string    `db:"title"`
	Author      string    `db:"author"`
	PublishDate time.Time `db:"publish_date"`
	ISBN        string    `db:"isbn"`
	Pages       int       `db:"pages"`
	Price       float64   `db:"price"`
	Description string    `db:"description"`
	CategoryID  int       `db:"category_id"`
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
}
